using System;
using System.Collections.ObjectModel;
using System.Globalization;
using System.Windows.Data;

namespace OpenLS.Spreadsheet.UI.Internals
{
    internal class DefinedNamesViewFactory : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            ObservableCollection<DefinedName> n = (ObservableCollection<DefinedName>) value;
            return new DefinedNamesCollectionView(n);
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotSupportedException();
        }
    }
}